# Makefile for JADE project - examples/jess directory

# The following targets are not file names
.PHONY: all clean

JC = javac
JFLAGS = -deprecation
TARGETS = jess/JessAgent.java

all: 
	@echo Making jess example
	$(JC) $(JFLAGS) -classpath $(CLASSPATH):$(SRCDIR):$(CLSDIR) $(TARGETS)

clean:
	rm -f `find . -name '*~' -print`
	rm -f `find . -name '#*#' -print`

batch:
	rm -f $(BATCH_JESSEXAMPLE)
	echo '@REM ===============================================================' > $(BATCH_JESSEXAMPLE)
	echo '@REM =           Generated by JADE Makefile. DO NOT EDIT           =' >> $(BATCH_JESSEXAMPLE)
	echo '@REM ===============================================================' >> $(BATCH_JESSEXAMPLE)
	echo >> $(BATCH_JESSEXAMPLE)
	echo 'echo Remind to set the CLASSPATH to include the jess packages' >> $(BATCH_JESSEXAMPLE)
	echo >> $(BATCH_JESSEXAMPLE)
	echo 'cd src\examples' >> $(BATCH_JESSEXAMPLE)
	echo '$(JC) $(subst /,\,$(subst $(ROOTDIR),..\..,$(JFLAGS))) -d ..\..\classes -classpath %CLASSPATH%;..;..\..\classes $(subst /,\,$(TARGETS))' >> $(BATCH_JESSEXAMPLE)
	echo >> $(BATCH_JESSEXAMPLE)
	echo 'cd ..\..' >> $(BATCH_JESSEXAMPLE)


